<link rel="stylesheet" type="text/css" href="/assets/third-party/datatables/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="/assets/css/dataTables.bootstrap.css">
<link rel="stylesheet" type="text/css" href="/assets/third-party/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css">

<style type="text/css">
	.il{
		display: inline;
	}
	.form-group .control-label{
		padding-right: 5px;
	}
	.form-group .col-sm-7{
		padding-left: 5px;
	}
	.form-group input, .form-group select{
		width: 88%;
		display: inline;
	}
</style>

<div class="container" style="margin-top: 60px;">
	
	<div class="row" style="margin-top: 10px;">
		<div class="col-lg-12">
			<div class="panel panel-default">
                <div class="panel-heading">
                    会员列表
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                	<a id="btnExport" href="#" class="btn btn-primary">导出</a>
                	<a id="btnDownload" href="#" class="btn btn-primary">下载</a>
					<table id="memberList" class="table table-bordered table-hover">
						<thead>
							<tr>
								<th>ID</th>
								<th>会员卡号</th>
								<th>会员姓名</th>
								<th>手机号码</th>
								<th>Email</th>
								<th>会员级别</th>
								<th>学生</th>
								<th>注册时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<?php for ($i=0; $i < 10; $i++) { ?>
							<tr>
								<td><?php echo $i; ?></td>
								<td><?php echo '00000000' . $i; ?></td>
								<td><?php echo '张三' . $i; ?></td>
								<td><?php echo '123456789' . $i; ?></td>
								<td><?php echo '123456789@evxin.com'; ?></td>
								<td><?php echo $i; ?></td>
								<td><?php echo '学生' . $i; ?></td>
								<td><?php echo date('Y-m-d');?></td>
								<td>-</td>
							</tr>
							<?php } ?>						
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
$(function(){
	$('#btnDownload').hide();
	$('#btnExport').click(function(){
		$.get('/admin/member/test', 
			function(data, status){
				$('#btnDownload').attr('href', data.file);
				$('#btnDownload').show();
		}, 'json');
	});
});
</script>